import { assertEquals } from 'jsr:@std/assert';
import View from '../View.ts';

Deno.test({
  name: 'test template engine',
  permissions: { read: true },
  fn: async () => {
    const view = new View({} as any);

    const html = await view.renderFile(import.meta.dirname + '/html.html', {
      insert: 'hello',
      name: 'ZS',
    });
    console.log(html);

    assertEquals(html, '<h1>hello</h1><h1>ZS</h1><p>..</p>');
  },
});
